package com.zhny.aiot.three.valve.plugin.model;

import com.zhny.aiot.plugin.ActionValue;
import com.zhny.aiot.plugin.PropertyValue;
import com.zhny.aiot.plugin.model.*;
import lombok.Data;

@Data
public class ThreeValveStoreEntry extends StoreEntity {
    @PropertyValue(alias = "电压",description = "电池电压",unit = "V",icon=IconConstract.Voltage,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryVoltage", eventType=EventType.Click)
    })
    private Double voltage;
    @PropertyValue(alias = "压力",description = "过水压力",unit = "mpa",icon=IconConstract.Pressure,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryPressure", eventType=EventType.Click)
    })
    private Double pressure;
    @PropertyValue(alias = "瞬时流量",description = "瞬时流量",unit = "m3/h",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryFlow", eventType=EventType.Click)
    })
    private Double flow;

    @PropertyValue(alias = "总流量",description = "瞬时流量",unit = "m3",icon=IconConstract.Flow,variableType=VariableType.Numerical,actions={
            @ActionValue(name=Operate.Check, commandCode="queryTotalFlow", eventType=EventType.Click)
    })
    private Double totalFlow;

    @PropertyValue(alias = "A阀门状态",description = "A阀门状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve1",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean valve1status;
    @PropertyValue(alias = "B阀门状态",description = "B阀门状态",unit = "",icon=IconConstract.Other,variableType=VariableType.StandardValve,actions={
            @ActionValue(name=Operate.Open,commandCode="openValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Close,commandCode="closeValve2",eventType=EventType.Click),
            @ActionValue(name=Operate.Query,commandCode="queryStatus",eventType=EventType.Click),
            @ActionValue(name=Operate.Init,commandCode="initialize",eventType=EventType.Click)
    })
    private Boolean valve2status;
}
